package com.hx.dc.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hx.dc.entity.DetailedOrder;
import com.hx.dc.service.DcCatagotyService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2019/2/13 0013.
 */
@Service("orderService")
public class DetailOrderServiceImlp extends BaseServiceImpl<DetailedOrder> implements com.hx.dc.service.DetailOrderService {
    @Override
    public int dantui(DetailedOrder detailedOrder) {
        return detailedOrderMapper.dantui(detailedOrder);
    }

    @Override
    public int updateOrder(DetailedOrder detailedOrder) {
        return detailedOrderMapper.updateOrder(detailedOrder);
    }

    @Override
    public PageInfo<DetailedOrder> selectDetailList(DetailedOrder detailedOrder, Integer pageIndex, Integer pageSize) {
        // 获取第1页，10条内容，默认查询总数count
        PageHelper.startPage(pageIndex, pageSize);
        List<DetailedOrder> list = detailedOrderMapper.selectDetailList(detailedOrder);//

        // 用PageInfo对结果进行包装
        PageInfo pageInfo = new PageInfo(list);
        return pageInfo;
    }


    /*@Override
    public List<DetailedOrder> show(String ordernum) {
        //DetailedOrder detailedOrder=this.detailedOrderMapper.show();
        List<DetailedOrder> list=this.detailedOrderMapper.show(ordernum);
        return list;
    }

    @Override
    public List<DetailedOrder> zhengjieshow(String deskid) {
        return detailedOrderMapper.zhengjieshow(deskid);
    }*/

}
